GtkApplicationWindow: Improve app menu label
authorMatthias Clasen <mclasen@redhat.com>
Sat, 21 Jan 2012 01:06:25 +0000 (20:06 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 21 Jan 2012 01:06:25 +0000 (20:06 -0500)
When we are showing the app menu in process, use the application
name, if it has been set. Otherwise, we still fall back to
"Application".

gtk/gtkapplicationwindow.c

index a95dcb6adbb17f2e69e5b560412c5e6c66da9fd7..4d901d51ff182e0c3f138fa38967f4110a573c22 100644 (file)
@@ -258,7 +258,14 @@ gtk_application_window_update_shell_shows_app_menu (GtkApplicationWindow *window
           app_menu = gtk_application_get_app_menu (gtk_window_get_application (GTK_WINDOW (window)));
 
           if (app_menu != NULL)
-            g_menu_append_submenu (window->priv->app_menu_section, _("Application"), app_menu);
+            {
+              const gchar *name;
+
+              name = g_get_application_name ();
+              if (name == g_get_prgname ())
+                name = _("Application");
+              g_menu_append_submenu (window->priv->app_menu_section, name, app_menu);
+            }
         }
     }
 }